home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / MPW Interfaces & Libraries / PInterfaces / Video.p < prev    next >
Encoding:
Text File  |  1992-01-29  |  5.4 KB  |  182 lines  |  [TEXT/MPS ]

  1.  
  2. {
  3. Created: Monday, September 16, 1991 at 1:39 AM
  4.  Video.p
  5.  Pascal Interface to the Macintosh Libraries
  6.  
  7.   Copyright Apple Computer, Inc. 1986-1991
  8.   All rights reserved
  9. }
  10.  
  11.  
  12. {$IFC UNDEFINED UsingIncludes}
  13. {$SETC UsingIncludes := 0}
  14. {$ENDC}
  15.  
  16. {$IFC NOT UsingIncludes}
  17.  UNIT Video;
  18.  INTERFACE
  19. {$ENDC}
  20.  
  21. {$IFC UNDEFINED UsingVideo}
  22. {$SETC UsingVideo := 1}
  23.  
  24. {$I+}
  25. {$SETC VideoIncludes := UsingIncludes}
  26. {$SETC UsingIncludes := 1}
  27. {$IFC UNDEFINED UsingQuickdraw}
  28. {$I $$Shell(PInterfaces)Quickdraw.p}
  29. {$ENDC}
  30. {$SETC UsingIncludes := VideoIncludes}
  31.  
  32. CONST
  33. mBaseOffset = 1;            {Id of mBaseOffset.}
  34. mRowBytes = 2;                {Video sResource parameter Id's }
  35. mBounds = 3;                {Video sResource parameter Id's }
  36. mVersion = 4;                {Video sResource parameter Id's }
  37. mHRes = 5;                    {Video sResource parameter Id's }
  38. mVRes = 6;                    {Video sResource parameter Id's }
  39. mPixelType = 7;                {Video sResource parameter Id's }
  40. mPixelSize = 8;                {Video sResource parameter Id's }
  41. mCmpCount = 9;                {Video sResource parameter Id's }
  42. mCmpSize = 10;                {Video sResource parameter Id's }
  43. mPlaneBytes = 11;            {Video sResource parameter Id's }
  44. mVertRefRate = 14;            {Video sResource parameter Id's }
  45. mVidParams = 1;                {Video parameter block id.}
  46. mTable = 2;                    {Offset to the table.}
  47. mPageCnt = 3;                {Number of pages}
  48. mDevType = 4;                {Device Type}
  49.  
  50. oneBitMode = 128;            {Id of OneBitMode Parameter list.}
  51. twoBitMode = 129;            {Id of TwoBitMode Parameter list.}
  52. fourBitMode = 130;            {Id of FourBitMode Parameter list.}
  53. eightBitMode = 131;            {Id of EightBitMode Parameter list.}
  54. sixteenBitMode = 132;        {Id of SixteenBitMode Parameter list.}
  55. thirtyTwoBitMode = 133;        {Id of ThirtyTwoBitMode Parameter list.}
  56.  
  57. firstVidMode = 128;            {The new, better way to do the above. }
  58. secondVidMode = 129;        { QuickDraw only supports six video }
  59. thirdVidMode = 130;            { at this time.      }
  60. fourthVidMode = 131;
  61. fifthVidMode = 132;
  62. sixthVidMode = 133;
  63.  
  64. spGammaDir = 64;
  65. spVidNamesDir = 65;
  66.  
  67. { Control Codes }
  68. cscReset = 0;
  69. cscKillIO = 1;
  70. cscSetMode = 2;
  71. cscSetEntries = 3;
  72. cscSetGamma = 4;
  73. cscGrayPage = 5;
  74. cscGrayScreen = 5;
  75. cscSetGray = 6;
  76. cscSetInterrupt = 7;
  77. cscDirectSetEntries = 8;
  78. cscSetDefaultMode = 9;
  79.  
  80. { Status Codes }
  81. cscGetMode = 2;
  82. cscGetEntries = 3;
  83. cscGetPageCnt = 4;
  84. cscGetPages = 4;            { This is what C&D 2 calls it. }
  85. cscGetPageBase = 5;
  86. cscGetBaseAddr = 5;            { This is what C&D 2 calls it. }
  87. cscGetGray = 6;
  88. cscGetInterrupt = 7;
  89. cscGetGamma = 8;
  90. cscGetDefaultMode = 9;
  91.  
  92. TYPE
  93. VPBlockPtr = ^VPBlock;
  94. VPBlock = RECORD
  95.  vpBaseOffset: LONGINT;        {Offset to page zero of video RAM (From minorBaseOS).}
  96.  vpRowBytes: INTEGER;        {Width of each row of video memory.}
  97.  vpBounds: Rect;            {BoundsRect for the video display (gives dimensions).}
  98.  vpVersion: INTEGER;        {PixelMap version number.}
  99.  vpPackType: INTEGER;
  100.  vpPackSize: LONGINT;
  101.  vpHRes: LONGINT;            {Horizontal resolution of the device (pixels per inch).}
  102.  vpVRes: LONGINT;            {Vertical resolution of the device (pixels per inch).}
  103.  vpPixelType: INTEGER;        {Defines the pixel type.}
  104.  vpPixelSize: INTEGER;        {Number of bits in pixel.}
  105.  vpCmpCount: INTEGER;        {Number of components in pixel.}
  106.  vpCmpSize: INTEGER;        {Number of bits per component}
  107.  vpPlaneBytes: LONGINT;        {Offset from one plane to the next.}
  108.  END;
  109.  
  110. VDEntRecPtr = ^VDEntryRecord;
  111. VDEntryRecord = RECORD
  112.  csTable: Ptr;                {(long) pointer to color table entry=value, r,g,b:INTEGER}
  113.  END;
  114.  
  115. { Parm block for SetGray control call }
  116. VDGrayPtr = ^VDGrayRecord;
  117. VDGrayRecord = RECORD
  118.  csMode: BOOLEAN;            {Same as GDDevType value (0=mono, 1=color)}
  119.  END;
  120.  
  121. { Parm block for SetEntries control call }
  122. VDSetEntryPtr = ^VDSetEntryRecord;
  123. VDSetEntryRecord = RECORD
  124.  csTable: ^ColorSpec;        {Pointer to an array of color specs}
  125.  csStart: INTEGER;            {Which spec in array to start with, or -1}
  126.  csCount: INTEGER;            {Number of color spec entries to set}
  127.  END;
  128.  
  129. { Parm block for SetGamma control call }
  130. VDGamRecPtr = ^VDGammaRecord;
  131. VDGammaRecord = RECORD
  132.  csGTable: Ptr;                {pointer to gamma table}
  133.  END;
  134.  
  135. VDPgInfoPtr = ^VDPageInfo;
  136. VDPageInfo = RECORD
  137.  csMode: INTEGER;            {(word) mode within device}
  138.  csData: LONGINT;            {(long) data supplied by driver}
  139.  csPage: INTEGER;            {(word) page to switch in}
  140.  csBaseAddr: Ptr;            {(long) base address of page}
  141.  END;
  142.  
  143. VDSzInfoPtr = ^VDSizeInfo;
  144. VDSizeInfo = RECORD
  145.  csHSize: INTEGER;            {(word) desired/returned h size}
  146.  csHPos: INTEGER;            {(word) desired/returned h position}
  147.  csVSize: INTEGER;            {(word) desired/returned v size}
  148.  csVPos: INTEGER;            {(word) desired/returned v position}
  149.  END;
  150.  
  151. VDSettingsPtr = ^VDSettings;
  152. VDSettings = RECORD
  153.  csParamCnt: INTEGER;        {(word) number of params}
  154.  csBrightMax: INTEGER;        {(word) max brightness}
  155.  csBrightDef: INTEGER;        {(word) default brightness}
  156.  csBrightVal: INTEGER;        {(word) current brightness}
  157.  csCntrstMax: INTEGER;        {(word) max contrast}
  158.  csCntrstDef: INTEGER;        {(word) default contrast}
  159.  csCntrstVal: INTEGER;        {(word) current contrast}
  160.  csTintMax: INTEGER;        {(word) max tint}
  161.  csTintDef: INTEGER;        {(word) default tint}
  162.  csTintVal: INTEGER;        {(word) current tint}
  163.  csHueMax: INTEGER;            {(word) max hue}
  164.  csHueDef: INTEGER;            {(word) default hue}
  165.  csHueVal: INTEGER;            {(word) current hue}
  166.  csHorizDef: INTEGER;        {(word) default horizontal}
  167.  csHorizVal: INTEGER;        {(word) current horizontal}
  168.  csHorizMax: INTEGER;        {(word) max horizontal}
  169.  csVertDef: INTEGER;        {(word) default vertical}
  170.  csVertVal: INTEGER;        {(word) current vertical}
  171.  csVertMax: INTEGER;        {(word) max vertical}
  172.  END;
  173.  
  174.  
  175.  
  176. {$ENDC} { UsingVideo }
  177.  
  178. {$IFC NOT UsingIncludes}
  179.  END.
  180. {$ENDC}
  181.  
  182.